#rm -f ./eval_result.txt
file_name=$(python ./libs/configs/cfgs.py)
if [ ! -d "./output/trained_weights/${file_name}" ];then
	mkdir ./output/trained_weights/${file_name}
else
	echo "./output/trained_weights/${file_name} exit!"
fi
#echo ./output/trained_weights/${file_name}
temp=$(ls ./output/trained_weights/${file_name} -l |grep "^-"|wc -l)
#time=$(date "+%Y-%m-%d-%H:%M:%S")
while true
do
fileCount=$(ls ./output/trained_weights/${file_name} -l |grep "^-"|wc -l)
#echo $fileCount
#echo $temp
if [[ $fileCount -gt $temp ]]; then
	let temp=$fileCount+0
	cd ./tools
	python eval.py | sed -n '10,$p' | sed '2,3d' | sed '4 a \\n' >> ../eval_results/eval_result_${file_name}.txt
	cd ..
fi
#echo process:$fileCount --  ${time}
sleep 200
done